[% setvar title Pseudo-hashes must die! %]
<div id="archive-notice">
    <h3>This file is part of the Perl 6 Archive</h3>
    <p>To see what is currently happening visit <a href="http://www.perl6.org/">http://www.perl6.org/</a></p>
</div>
<div class='pod'>
<a name='TITLE'></a><h1>TITLE</h1>
<p>Pseudo-hashes must die!</p>
<a name='VERSION'></a><h1>VERSION</h1>
<pre>  Maintainer: Michael Schwern &lt;<a href='mailto:schwern@pobox.com'>schwern@pobox.com</a>&gt; 
  Date: 16 Sep 2000
  Mailing List: perl6-language @perl.org
  Number: 241
  Version: 1
  Status: Developing (Last Call)</pre>
<a name='ABSTRACT'></a><h1>ABSTRACT</h1>
<p>Pseudo-hashes and the associated fields pragma shoule be removed from
Perl 6.</p>
<a name='DESCRIPTION'></a><h1>DESCRIPTION</h1>
<p>There are numerous insuperable problems with pseudo-hashes, as
detailed in &quot;Object Oriented Perl&quot; and &quot;Programming Perl, Ed. 3&quot;.
They are a noble experiment that many feel has failed.  They should be
removed.</p>
<p>Pseudo-hashes have existed since at least May 28th, 1997 when they were
added as patch #2 to what would eventually become 5.004_50.  Two
years, three months and 20 days later they're still considered
experimental, incomplete and loaded with caveats.</p>
<pre>        Doesn't play well with multiple inheritance
        Muddles the behavior of typed variables
        Requires significant extra documentation and complication of
                hash operations.
        Inconsistencies between typed and untyped access.
        Pseudo-hashes, unless used very carefully, often turn out slower
                than hashes.</pre>
<p>Pseudo-hashes were added to solve three problems: restrict keyspace,
reduce memory usage and increase speed of hashes.  There are many RFCs
which address these issues with less caveats.</p>
<p>There has been some discussion on p5p regarding the removal of
pseudo-hashes (and other experimental features) should their
adolescence take too long.  Two major revisions of experimentation was
given as a rough limit to declaring an experiment as a failure.</p>
<p>The extensive development time, continued experimental nature, caveats
and availability of better proposals lead to one conclusion:</p>
<pre>        B&lt;PSEUDO-HASHES MUST DIE&gt;</pre>
<a name='MIGRATION'></a><h1>MIGRATION</h1>
<p>Considerable.  Most would be solved by a clever rejigging of the
fields pragma to revert to simple hashes or other Perl 6 features.  A
100% perfect conversion will not be achieved without an inorderinate
amount of work.  Since pseudohashes were an experimental feature, a
less-than-perfect migration is acceptable.  You pays your money and
you takes your chances.  (As a fairly extensive user of pseudohashes,
I'm willing to take the hit.)</p>
<a name='IMPLEMENTATION'></a><h1>IMPLEMENTATION</h1>
<p>Very simple, don't implement it. :) In Perl 5 terms, avhv functions
removed from av.c, pseudo-hash code removed from pp.c, pp_hot.c,
doop.c, mg.c, embed.pl etc.... and pseudo-hash documentation caveats
removed from perlref and perlfunc.</p>
<a name='REFERENCES'></a><h1>REFERENCES</h1>
<p>Discussion of experation of experimental features.
<a href='http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2000-01/msg00017.html' target='_blank'>www.xray.mpe.mpg.de</a>
<a href='http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2000-01/msg00255.html' target='_blank'>www.xray.mpe.mpg.de</a></p>
<p>RFCs which supplant pseudohash functionality.</p>
<p>RFC 188 - Objects : Private keys and methods</p>
<p>RFC 200 - Objects: Revamp tie to support extensibility (Massive tie changes)</p>
<p>RFC 163 - Automatic accessors for hash-based objects</p>
<p>RFC 124 - Sort order for any hash</p>
<p>RFC 122 - types and structures</p>
<p>etc...</p>
<p><a href='http://us.imdb.com/Title?0165929' target='_blank'>us.imdb.com</a></p>
<p><a href='http://us.imdb.com/Title?0102691' target='_blank'>us.imdb.com</a></p>
<p><a href='http://us.imdb.com/Title?0094077' target='_blank'>us.imdb.com</a></p>
<p><a href='http://us.imdb.com/Title?0054474' target='_blank'>us.imdb.com</a></p>
</div>
